package com.david.auth.pojo.api;

import com.david.auth.pojo.result.R;
import com.david.auth.pojo.api.fallback.AuthApiFallback;
import com.david.auth.pojo.query.TokenQuery;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
* 鉴权
*
* @author David
* @Date 2022-01-14 17:18:26
*/
@Api("鉴权服务")
@FeignClient(name="op-cloud-auth-server", path ="/auth/token",fallback = AuthApiFallback.class)
public interface AuthApi {

    /**
    * 验证token
     * @param tokenQuery
     * @return r成功失败
    */
    @PostMapping(name="验证token", value = "/verifyToken")
    @ApiOperation(value = "验证token" ,httpMethod = "POST")
    R verifyToken(@RequestBody @Valid TokenQuery tokenQuery);

}
